# with open(".data.txt","w",encoding="utf-8") as f:   #w模式下，会自动创建文件，但不能读
#     f.write('赵家康\n')
#     f.write('徐晴\n')
#     # print(f.read())

with open(".data.txt","w",encoding="utf-8") as f:
    f.write("我欲乘风归去，\n又恐琼楼玉宇，\n高处不胜寒。\n")

with open(".data.txt","a",encoding="utf-8") as f:
    f.write("起舞弄清影，\n何似在人间。")

with open(".data.txt","r+",encoding="utf-8") as f:
    # f.write("写上了吗？？？？？？？？？？？？？？？？？？？？？")
    #得在读之后写
    print(f.read())
    f.write("写上了吗？？？？？？？？？？？？？？？？？？？？？")
    #新写进去的读不出来
    print(f.read())

